#ifndef OSG_NODE_LAYER_H
#define OSG_NODE_LAYER_H
#include <osg/Group>
#include "AbstractLayer.h"

class OsgNodeLayer : public AbstractLayer
{
    Q_OBJECT
public:
	OsgNodeLayer();
	~OsgNodeLayer();
public:
	void setVisible(bool visible);
	bool loadFromJson(const QString& json);
	QString toJson()const;

	void appendChild(AbstractItem* item);
	void insertChild(int pos,AbstractItem* item);
	int indexOfChild(AbstractItem* item);
	void removeChild(int pos);
	void removeChild(AbstractItem* item);
	int countOfChild()const;

	osg::Group* getOsgGroup()const
	{
	    return group;
	}
private:
	osg::Group* group = nullptr;
};

#endif